﻿Ext.define('app.prm.document.DocumentLog',
{
    extend: 'Ext.window.Window',
    title: '文档日志',
    autoScroll: true,
    modal: true,
    width: 700,
    height: 600,
    documentId: 0,
    layout: 'fit',
    initComponent: function () {
        var me = this;
        me.items = [me.getGrid()];
        me.buttons = [
            { text: '关闭', handler: function () { me.close(); } }
        ]
        me.callParent();
    },
    getGrid: function () {
        var me = this;
        if (!this.docGrid) {
            this.docGrid = new Ext.grid.Panel({
                viewConfig: {
                    enableTextSelection: true //可以复制单元格文字
                },
                store: Ext.create("app.ux.PrmStore", { url: '/api/services/app/project/GetOperationLog', filter: { HostId: me.documentId, Operation: 20 } }),
                forceFit: true,
                columns: [
                    { header: '时间', maxWidth: 100, dataIndex: 'creationTime' },
                    { header: '操作人', maxWidth: 100, dataIndex: 'createionUser' },
                    { header: localize('Operating'), dataIndex: 'note' }
                ]
            });
        }
        return this.docGrid;
    }
});